
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html">

<h:body style="background-color:#FFCC99">
	<h:form>
		<p style="background-color: #B870FF"></p>
		
		<center>
		<p style="background-color: #B870FF">
		<h1>Chestionar</h1>
		<h:graphicImage value="writing.png" style="height: 150px; width: 1259px; " />
		</p>
		</center>

		<div align="right"><h:commandButton value="Back" action="user"></h:commandButton></div>

		
		

			
		<br />
		<ui:repeat value="#{completeazaChBean.chestionar.intrebari}"
			var="intrebare" varStatus="index">
			<h:panelGrid columns="1">
				<h:outputText value="#{index.index+1}. #{intrebare.text}"
					style="font-family: Georgia; color: #000053; font-size: 17" />

				<h:inputTextarea rendered="#{intrebare.tip == 1}"
					value="#{intrebare.raspuns}"
					style="font-family: Georgia; color: #191997; font-size: 14"></h:inputTextarea>

				<ui:repeat value="#{intrebare.optiuni}" var="optiune"
					rendered="#{intrebare.tip == 2}">
					<h:panelGrid columns="2">
						<h:selectBooleanCheckbox value="#{optiune.selectat}"
							style="height: 20px; width: 22px ; font-family: Georgia; color: #191997; font-size: 14" />
						<h:outputText value="#{optiune.text}" />

						<h:inputTextarea rendered="#{optiune.e_cu_comentariu }"
							value="#{intrebare.raspuns}"></h:inputTextarea>




					</h:panelGrid>
					<!--  <f:selectItem itemValue="#{true}" /> -->
				</ui:repeat>



				<h:selectOneRadio value="#{intrebare.raspunsRadioButton}"
					rendered="#{intrebare.tip == 3}" layout="pageDirection"
					style="font-family: Georgia; color: #191997; font-size: 14">

					<f:selectItems value="#{intrebare.optiuni}" var="c"
						itemLabel="#{c.text}" itemValue="#{c.id}" />
				</h:selectOneRadio>

				<h:inputTextarea rendered="#{intrebare.withComment}"
					value="#{intrebare.raspuns}"></h:inputTextarea>


			</h:panelGrid>
		</ui:repeat>
		<br />
		<br />

		<center><h:commandButton value="Salveaza chestionar"
			action="#{completeazaChBean.saveRaspunsuri}"
			style="font-family:Georgia; font-size:100%; height: 36px; width: 256px; "
			align="top"></h:commandButton></center>

	</h:form>
</h:body>
<p style="background-color: #B2FEE1"></p>

</html>
